package org.example.service.post;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.example.dao.dto.post.PostDto;
import org.example.partten.builder.product.post.PPostDto;
import org.example.dao.entity.post.PImage;
import org.example.dao.entity.post.PPost;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface PostService {
    PPostDto addPostByImage(String content, Long themeId);

    PPost updatePost(Long id,String content, Long themeId);


    IPage<PostDto> getPostByTheme(Long themeId, Integer limit, Integer start);


    void deletePost(Long id);

    Long likePost(Long id);

    PostDto clickPost(Long id);

    Long transferPost(Long id);


    IPage<PostDto> getPostByMine(Integer limit, Integer start);

    IPage<PostDto> getPostByRecommend(Long themeId, Integer limit, Integer start);


    PImage addPostImage(Long postId, MultipartFile file);


    IPage<PostDto> searchPost(Integer isValid, Long themeId,String content, Integer limit, Integer start);

    IPage<PostDto> getPostByThemeAndHot(Long themeId, Integer limit, Integer start);

    List<String> getSearchHistory();

    List<String> getSearchRecommend();

    List<String> getSearchHotRank();

    List<String> getSearchIntime(String content);

    void clearSearchHistory();
}
